import java.util.Scanner;
//走方格数
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2023-03-30
 * Time: 23:17
 */
public class TestDemo {
    public static void main(String[] args) {

        Scanner sc= new Scanner(System.in);
                while (sc.hasNext()) {
                    int n = sc.nextInt();
                    int m = sc.nextInt();
                    System.out.println(med(n,m));
                }
            }
            public static int med(int n,int m) {
                //n=1,m>=1||n>=1,m=1
                if (m==1||n==1) {
                    return n+m;
                }
                //n>1,m>1
                return med(n-1,m)+med(n,m-1);
            }
        }


    }
}
